package javabasic;
/*
定义一个手机类，手机类有两个私有属性（手机品牌、手机价格）
* */
public class Phone {
    private  String phonename;
    private  double phoneprice;
    //通过set、get方法为私有成员变量赋值
    public void setPhonename(String phonename)
    {
        this.phonename=phonename;
        }

public String getPhonename() {
        return this.phonename;
        }

public void show()
        {
        System.out.println("手机品牌是："+this.phonename);
        }
        }
